﻿<%@ Page Language="VB" AutoEventWireup="false" MasterPageFile="~/MainLayout.master" CodeFile="RecentTransactionEntry.aspx.vb" Inherits="RecentTransactionEntry" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <h1>Property Transaction Entry</h1>
    <hr />
    <asp:UpdatePanel ID="udpMessage" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <div runat="server" id="divError" class="msg-box-error" visible="false" enableviewstate="false">

                <span class="title">Error</span><br />
                <asp:Label ID="lblMsgError" runat="server" Text="ERROR" />
            </div>
            <div runat="server" id="divSuccessful" class="msg-box-success" visible="false" enableviewstate="false">

                <span class="title">Successful</span><br />
                <asp:Label ID="lblMsgSuccessful" runat="server" Text="Success" />

            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="upgContentGeneral" runat="server" AssociatedUpdatePanelID="upPropertyEntry">
        <ProgressTemplate>
            <div style="top: 0px; position: fixed; width: 100%; text-align: center">
                <span style="background-color: Yellow; font-weight: bold">Loading ...</span>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>

    <asp:Label ID="lblStaffUID" runat="server" Visible="false" />

    <div class="form-container" id="divContentGeneral">
        <table width="100%">
            <tr>
                <td class="General-info-title" style="width: 250px;">
                    <h3>Property Transaction Record Entry</h3>
                </td>
                <td>
                    <div class="General-info-title-line"></div>
                </td>
            </tr>
        </table>
        <asp:UpdatePanel ID="upPropertyDetail" UpdateMode="Conditional" runat="server">
            <ContentTemplate>
                <table class="form-table" cellpadding="5" cellspacing="5">
                    <tr>
                        <th scope="row" style="width: inherit">Transaction Type :
                        </th>
                        <td style="width: 600px">
                            <asp:DropDownList ID="ddlTransactType" runat="server">
                                <asp:ListItem Text="-SELECT-" Value="" Selected="True" />
                                <asp:ListItem Text="RENT" Value="1" />
                                <asp:ListItem Text="SALE" Value="2" />
                            </asp:DropDownList>
                            <span style="color: Red">*<asp:RequiredFieldValidator ID="rfvddlPropertyType" ControlToValidate="ddlTransactType"
                                SetFocusOnError="true" runat="server" ValidationGroup="Entry" ErrorMessage="<br />Please select a transaction type"
                                ForeColor="Red" Display="Dynamic" />
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: inherit">LSK Transaction :
                        </th>
                        <td style="width: 600px">
                            <asp:DropDownList ID="ddlLSK" runat="server">
                                <asp:ListItem Text="-SELECT-" Value="" Selected="True" />
                                <asp:ListItem Text="YES" Value="1" />
                                <asp:ListItem Text="NO" Value="2" />
                            </asp:DropDownList>
                            <span style="color: Red">*<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="ddlLSK"
                                SetFocusOnError="true" runat="server" ValidationGroup="Entry" ErrorMessage="<br />Please specify whether the transaction was done by LSK."
                                ForeColor="Red" Display="Dynamic" />
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: inherit">Land Type :
                        </th>
                        <td style="width: 600px">
                            <asp:DropDownList ID="ddlLandType" runat="server">
                                <asp:ListItem Text="-SELECT-" Value="" Selected="True" />
                                <asp:ListItem Text="INDUSTRI" Value="1" />
                                <asp:ListItem Text="KEDIAMAN" Value="2" />
                                <asp:ListItem Text="PEMBANGUNAN" Value="3" />
                                <asp:ListItem Text="PERDAGANGAN" Value="4" />
                                <asp:ListItem Text="PERTANIAN" Value="5" />
                                <asp:ListItem Text="LAIN-LAIN" Value="6" />
                            </asp:DropDownList>
                            <span style="color: Red">*<asp:RequiredFieldValidator ID="RequiredFieldValidator12" ControlToValidate="ddlLandType"
                                SetFocusOnError="true" runat="server" ValidationGroup="Entry" ErrorMessage="<br />Please select a land type"
                                ForeColor="Red" Display="Dynamic" />
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: inherit">Property Type :
                        </th>
                        <td style="width: 600px">
                                <asp:DropDownList ID="ddlProperyType" runat="server">
                                <asp:ListItem Text="-SELECT-" Value="" Selected="True" />
                                <asp:ListItem Text="Others" Value="1" />
                                <asp:ListItem Text="Apartment/Condo" Value="2" />
                                <asp:ListItem Text="House" Value="3" />
                                <asp:ListItem Text="Flat" Value="4" />
                                <asp:ListItem Text="Factory" Value="5" />
                                <asp:ListItem Text="Shop/Office" Value="6" />
                                <asp:ListItem Text="Land" Value="7" />
                            </asp:DropDownList>
                            <span style="color: Red">*<asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="ddlProperyType"
                                SetFocusOnError="true" runat="server" ValidationGroup="Entry" ErrorMessage="<br />Please select a property type"
                                ForeColor="Red" Display="Dynamic" />
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: inherit">Alamat :
                        </th>
                        <td style="width: 600px">
                            <asp:TextBox ID="txtAlamat" Style="width: inherit; height: auto" runat="server" MaxLength="500" TextMode="MultiLine" ToolTip="Alamat Details" placeholder="max length : 500 characters" />
                            <span style="color: Red">*<asp:RequiredFieldValidator ID="RequiredFieldValidator3" ControlToValidate="txtAlamat" SetFocusOnError="true" runat="server" ValidationGroup="Entry" ErrorMessage="<br />Please enter alamat." ForeColor="Red" Display="Dynamic" /></span>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: inherit">Kawasan :
                        </th>
                        <td style="width: 600px">
                            <asp:TextBox ID="txtKawasan" Style="width: inherit; height: auto" runat="server" MaxLength="300" TextMode="MultiLine" ToolTip="Kawasan Details" placeholder="max length : 300 characters" />
                            <span style="color: Red">*<asp:RequiredFieldValidator ID="RequiredFieldValidator4" ControlToValidate="txtKawasan" SetFocusOnError="true" runat="server" ValidationGroup="Entry" ErrorMessage="<br />Please enter kawasan." ForeColor="Red" Display="Dynamic" /></span>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: inherit">Project :
                        </th>
                        <td style="width: 600px">
                            <asp:TextBox ID="txtProject" Style="width: inherit; height: auto" runat="server" MaxLength="300" TextMode="MultiLine" ToolTip="Project Detail" placeholder="max length : 300 characters" />
                            <span style="color: Red">*<asp:RequiredFieldValidator ID="RequiredFieldValidator5" ControlToValidate="txtProject" SetFocusOnError="true" runat="server" ValidationGroup="Entry" ErrorMessage="<br />Please enter project." ForeColor="Red" Display="Dynamic" /></span>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: inherit">Daerah :
                        </th>
                        <td style="width: 600px">
                                <asp:DropDownList ID="ddlDaerah" runat="server">
                                <asp:ListItem Text="-SELECT-" Value="" Selected="True" />
                                <asp:ListItem Text="BALING" Value="1" />
                                <asp:ListItem Text="BANDAR BARU" Value="2" />
                                <asp:ListItem Text="BARAT DAYA" Value="3" />
                                <asp:ListItem Text="KUALA MUDA" Value="4" />
                                <asp:ListItem Text="KULIM" Value="5" />
                                <asp:ListItem Text="SEBERANG PERAI SELATAN" Value="6" />
                                <asp:ListItem Text="SEBERANG PERAI TENGAH" Value="7" />
                                <asp:ListItem Text="SEBERANG PERAI UTARA" Value="8" />
                                <asp:ListItem Text="TIMUR LAUT" Value="9" />
                            </asp:DropDownList>
                            <span style="color: Red">*<asp:RequiredFieldValidator ID="RequiredFieldValidator6" ControlToValidate="ddlDaerah"
                                SetFocusOnError="true" runat="server" ValidationGroup="Entry" ErrorMessage="<br />Please select a Daerah"
                                ForeColor="Red" Display="Dynamic" />
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: inherit">Price :
                        </th>
                        <td style="width: 600px">
                            <asp:TextBox ID="txtPrice" Style="width: inherit; height: auto" runat="server" MaxLength="20" ToolTip="Daerah Detail" placeholder="number only" onkeypress="return isNumberKeyOnly(event)" onpaste="return isNumberKeyOnly(event)"/>
                            <span style="color: Red">*<asp:RequiredFieldValidator ID="RequiredFieldValidator7" ControlToValidate="txtPrice" SetFocusOnError="true" runat="server" ValidationGroup="Entry" ErrorMessage="<br />Please enter price." ForeColor="Red" Display="Dynamic" /></span>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: inherit">Transaction Date :
                        </th>
                        <td style="width: 600px">
                            <asp:TextBox ID="txtTransactionDate" Style="width: inherit; height: auto" runat="server" MaxLength="20" ToolTip="Daerah Detail" placeholder="date (format:dd-MMM-yyyy)" />
                            <asp:ImageButton runat="Server" ID="imgToDateCal" AlternateText="Click to show calendar" ImageUrl="~/images/style01/Btn-calendar.png" />
                            <cc1:CalendarExtender ID="ceToDate" runat="server" Format="dd-MMM-yyyy" TargetControlID="txtTransactionDate" PopupButtonID="imgToDateCal" />
                            <span style="color: Red">*<asp:RequiredFieldValidator ID="RequiredFieldValidator11" ControlToValidate="txtTransactionDate" SetFocusOnError="true" runat="server" ValidationGroup="Entry" ErrorMessage="<br />Please enter transaction date." ForeColor="Red" Display="Dynamic" /></span>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: inherit">Land Size :
                        </th>
                        <td style="width: 600px">
                            <asp:TextBox ID="txtLand" Style="width: inherit; height: auto" runat="server" MaxLength="20" ToolTip="Land Detail" placeholder="number only" onkeypress="return isNumberKeyOnly(event)" onpaste="return isNumberKeyOnly(event)"/>
                            <span style="color: Red">*<asp:RequiredFieldValidator ID="RequiredFieldValidator8" ControlToValidate="txtLand" SetFocusOnError="true" runat="server" ValidationGroup="Entry" ErrorMessage="<br />Please enter land size." ForeColor="Red" Display="Dynamic" /></span>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: inherit">Build Up Size :
                        </th>
                        <td style="width: 600px">
                            <asp:TextBox ID="txtBuildUp" Style="width: inherit; height: auto" runat="server" MaxLength="20" ToolTip="Build Up Detail" placeholder="number only" onkeypress="return isNumberKeyOnly(event)" onpaste="return isNumberKeyOnly(event)"/>
                            
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width: inherit">Bedroom :
                        </th>
                        <td style="width: 600px">
                            <asp:TextBox ID="txtBedroom" Style="width: inherit; height: auto" runat="server" MaxLength="20" ToolTip="No of Bedroom" placeholder="integer value only" onkeypress="return isNumberKeyOnly(event)" onpaste="return isNumberKeyOnly(event)"/>
                            
                        </td>
                    </tr>
                </table>

                <!-- HIDDEN FIELD -->
            </ContentTemplate>
        </asp:UpdatePanel>
        <asp:Label ID="lblhidPropertyId" runat="server" Visible="false" />
        <asp:Label ID="lblhidStaffId" runat="server" Visible="false" />
        <asp:Label ID="lblhidStaffType" runat="server" Visible="false" />
    </div>

    <div class=" form-entry-container">

        <table width="100%" style="margin-left: 0px;">
            <tr>
                <td>
                    <div class="General-info-title-line"></div>
                </td>
                <td style="width: 300px;">
                    <asp:UpdatePanel ID="upPropertyEntry" runat="server">
                        <ContentTemplate>
                            &nbsp;<asp:Button ID="btnBack" runat="server" Text="Cancel" CssClass="search-btn" Width="60" />
                            &nbsp;<asp:Button ID="BtnSave" runat="server" Text="Save" ValidationGroup="Entry" CssClass="search-btn" Width="80" />
                            <asp:Button ID="btnUploadPhoto" runat="server" Text="Upload Photo" CssClass="search-btn" Width="80" Visible="false"/>
                            <cc1:ConfirmButtonExtender ID="CBEBack" runat="server" TargetControlID="btnBack" ConfirmText="Do you want to cancel? All your unsaved data will be lost." />
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </td>
                <td style="width: 60px">
                    <div class="General-info-title-line"></div>
                </td>
            </tr>
        </table>
        <div class=" form-entry-title" style="line-height: 15px; margin-bottom: 0px; margin-top: 15px;"><span style="color: Red; font-size: 10px;">*Required fields</span></div>
    </div>

</asp:Content>
